//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.study.common;

import com.study.Enum.ResultJsonEnum;

public class ResultJson {
    private Object data;
    private String message;
    private Integer code;

    public static ResultJson ok() {
        return new ResultJson(ResultJsonEnum.SUCCESS.getValue(), ResultJsonEnum.SUCCESS.getMessage());
    }

    public static ResultJson ok(Object object) {
        return new ResultJson(ResultJsonEnum.SUCCESS.getValue(), ResultJsonEnum.SUCCESS.getMessage(), object);
    }

    public static ResultJson error() {
        return new ResultJson(ResultJsonEnum.FAIL.getValue(), ResultJsonEnum.FAIL.getMessage());
    }

    public static ResultJson error(Object object) {
        return new ResultJson(ResultJsonEnum.FAIL.getValue(), ResultJsonEnum.FAIL.getMessage(), object);
    }

    public ResultJson(Integer code, String message, Object object) {
        this.code = code;
        this.message = message;
        this.data = object;
    }

    public ResultJson(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Object getData() {
        return this.data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public String getMessage() {
        return this.message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public int getCode() {
        return this.code;
    }

    public void setCode(int code) {
        this.code = code;
    }
}
